using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace SinceTimes.NetWork
{
    public interface IHandler
    {
        void HandleOne(IPeerMessage msg);
    }
    public class Handler : MonoBehaviour, IHandler
    {
        public float Rate = 20f;
        void IHandler.HandleOne(IPeerMessage msg) => _DoHandle(msg);

        // Start is called before the first frame update
        void Start()
        {
           
        }


        float _LastHandle = 0;

        float _COC { get { return Rate<=0?0: 1 / Rate; } }
        // Update is called once per frame

        protected virtual void _DoHandle(IPeerMessage msg)
        {
            


        }
    }
}

